package br.com.assemble.hermeserp.model.pojos.comercial;

import java.io.Serializable;
import java.math.BigInteger;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import br.com.assemble.hermeserp.ejb.annotation.DaoClass;
import br.com.assemble.hermeserp.model.BasePojo;
import br.com.assemble.hermeserp.model.pojos.enderecamento.Bairro;
import br.com.assemble.hermeserp.model.pojos.enderecamento.Municipio;
import br.com.assemble.hermeserp.model.pojos.enderecamento.Unidade;


/**
 * The persistent class for the DIVISOES database table.
 * 
 */
@Entity
@Table(name="DIVISOES")
@DaoClass(value="DivisaoDao", pu="hermes-pu")
public class Divisao extends BasePojo implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="DIV_IDENTIFY", unique=true, nullable=false)
	private BigInteger divIdentify;

	//bi-directional many-to-one association to Bairro
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="BAI_INDENTIFY")
	private Bairro bairro;

	//bi-directional many-to-one association to Municipio
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="MUN_IDENTIFY")
	private Municipio municipio;

	//bi-directional many-to-one association to RegiaoComercial
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="REG_IDENTIFY", nullable=false)
	private RegiaoComercial regiaoComercial;

	//bi-directional many-to-one association to Unidade
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="UND_IDENTIFY")
	private Unidade unidade;

    public Divisao() {
    }

	public BigInteger getDivIdentify() {
		return this.divIdentify;
	}

	public void setDivIdentify(BigInteger divIdentify) {
		this.divIdentify = divIdentify;
	}

	public Bairro getBairro() {
		return this.bairro;
	}

	public void setBairro(Bairro bairro) {
		this.bairro = bairro;
	}
	
	public Municipio getMunicipio() {
		return this.municipio;
	}

	public void setMunicipio(Municipio municipio) {
		this.municipio = municipio;
	}
	
	public RegiaoComercial getRegiaoComercial() {
		return this.regiaoComercial;
	}

	public void setRegiaoComercial(RegiaoComercial regiaoComercial) {
		this.regiaoComercial = regiaoComercial;
	}
	
	public Unidade getUnidade() {
		return this.unidade;
	}

	public void setUnidade(Unidade unidade) {
		this.unidade = unidade;
	}
	
}